package com.pt25.base.dep.llm;

import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.model.openai.OpenAiStreamingChatModel;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j
@Service
public class LlmService {

    @Resource
    private Map<String, OpenAiChatModel> openAiChatModelHashMap;

    @Resource
    Map<String, OpenAiStreamingChatModel> openAiStreamingChatModelHashMap;

    public OpenAiChatModel getOpenAiChatModel(String modelName) {
        return openAiChatModelHashMap.get(modelName);
    }

    public OpenAiStreamingChatModel getOpenAiStreamingChatModel(String modelName) {
        return openAiStreamingChatModelHashMap.get(modelName);
    }
}
